﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UserEditPassword.aspx.cs"
    Inherits="JWBSTAPP.User.UserEditPassword" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>修改密码</title>
    <link href="../Styles/AddOrEditPage.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" href="../Styles/validationEngine.jquery.css" type="text/css"
        media="screen" charset="utf-8" />
    <script src="../Scripts/jQuery-1.9.0.js" type="text/javascript"></script>
    <script type="text/javascript" src="../Scripts/jquery.validationEngine-cn.js"></script>
    <script type="text/javascript" src="../Scripts/jquery.validationEngine.js"></script>
    <script type="text/javascript" src="../Scripts/CommonADEQ3.js"></script>
    <script type="text/javascript" src="../Scripts/alert/ymPrompt.js"></script>
    <link rel="stylesheet" type="text/css" href="../Scripts/alert/skin/qq/ymPrompt.css" />
    <script type="text/javascript">
        $().ready(function () {
            $("#AdminUserFormEditPassword").validationEngine({
                promptPosition: "topLeft", // OPENNING BOX POSITION, IMPLEMENTED: topLeft, topRight, bottomLeft,  centerRight, bottomRight
                //validationEventTriggers: "keyup",
                success: false,
                failure: function () {
                }
            });
            $("#AdminUserFormEditPassword").submit(function () {
                if ($("#texPasswordNew").val() != $("#texPasswordNew2").val()) {
                    alert("两次输入的密码不一致！");
                } else {
                    var formString = $("#AdminUserFormEditPassword").serialize() + "&action=PWDEdit";
                    $.ajax({
                        type: "post",
                        data: formString,
                        url: "../AjaxServer/user/AppUserHandler.ashx",
                        success: function (message) {
                            var result = eval('(' + message + ')');
                            if (result.ISSucceed) {
                                ymPrompt.succeedInfo("修改成功");
                                setTimeout("window.parent.tb_remove();", 2000);
                            } else {
                                ymPrompt.errorInfo(result.Message);
                            }
                        },
                        error: function (XMLHttpRequest, textStatus, errorThrown) {
                            alert(textStatus);
                        }
                    });
                }
                return false;

            });
        });
    </script>
    <style type="text/css">
        #texAdminDesc
        {
            width: 323px;
            height: 75px;
        }
    </style>
</head>
<body>
    <div class="container">
        <form id="AdminUserFormEditPassword" action="" method="get">
        <table class="mainTable">
            <tr>
                <td class="mainTable_TitleTd" colspan="2">
                    用户修改密码
                </td>
            </tr>
            <tr>
                <td class="mainTable_LeftTd">
                    <label for="texPasswordOld">
                        原密码：</label>
                </td>
                <td class="mainTable_RightTd">
                    <input id="texPassword" name="texPasswordOld" class="validate[required]" type="password"
                        size="30" value="" /><em>*</em>
                </td>
            </tr>
            <tr>
                <td class="mainTable_LeftTd">
                    <label for="texPasswordNew">
                        新密码：</label>
                </td>
                <td class="mainTable_RightTd">
                    <input id="texPasswordNew" name="texPasswordNew" class="validate[required]" type="password"
                        size="30" value="" maxlength="6" /><em>*</em>
                </td>
            </tr>
            <tr>
                <td class="mainTable_LeftTd">
                    <label for="texPasswordNew2">
                        再次输入新密码：</label>
                </td>
                <td class="mainTable_RightTd">
                    <input id="texPasswordNew2" name="texPasswordNew2" class="validate[required]" type="password"
                        size="30" value="" maxlength="6" /><em>*</em>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <input id="hidID" type="hidden" />
                    <input class="button" type="submit" value="提交" />
                    <input class="button" type="button" value="取消" onclick="window.parent.tb_remove();" />
                </td>
            </tr>
        </table>
        </form>
    </div>
</body>
</html>
